"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _configContext = require("../../../../extends/configContext");

var _isMobile = _interopRequireDefault(require("../../../../utils/is-mobile"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var WebImgMobileController = function WebImgMobileController(_ref) {
  var _ref$imgUrls = _ref.imgUrls,
      imgUrls = _ref$imgUrls === void 0 ? [] : _ref$imgUrls,
      currentImgIdx = _ref.currentImgIdx;

  var _useConfig = (0, _configContext.useConfig)(),
      clsPrefix = _useConfig.clsPrefix;

  var IS_MOBILE = false;

  if (typeof window !== 'undefined') {
    IS_MOBILE = (0, _isMobile.default)();
  }

  if (imgUrls.length === 0 || !IS_MOBILE) return null;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _classnames.default)("".concat(clsPrefix, "-img-previewer__mobile-cursor"))
  }, currentImgIdx + 1, " / ", imgUrls.length);
};

var _default = WebImgMobileController;
exports.default = _default;